package com.cmcc.pcap.packet.util.pfcpUtile;

import com.cmcc.packet.entity.PfcpEntity;
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;

import java.net.Inet4Address;
import java.net.Inet6Address;
import java.util.HashMap;
import java.util.Map;

public class NetworkInstanceUtil implements PfcpTypeUtil {
    private static Logger logger = LogManager.getLogger(UserPlaneIPResourceInformationUtil.class);
    boolean v4;
    boolean v6;
    int seid;
    Inet4Address ipv4;
    Inet6Address ipv6;

    @Override
    public PfcpEntity.InformationElement analysisIe(byte[] sub_payload) {
        PfcpEntity.InformationElement peie = new PfcpEntity.InformationElement();
        try {
            peie.setType(((sub_payload[0] & 0xff) << 8) + (sub_payload[1] & 0xff));
            peie.setLength(((sub_payload[2] & 0xff) << 8) + (sub_payload[3] & 0xff));
            Map<String, String> dataMap = new HashMap<>();
        } catch (Exception e){
            throw new RuntimeException(e);
        }
        return null;
    }
}